package com.example.sort.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("矩形信息（长宽点位信息）")
public class RectangleInfo extends BaseInfo{

    @ApiModelProperty("是否排序")
    Boolean isOrder;

    @ApiModelProperty("是否排序")
    Float area;

    public RectangleInfo(){}

    public RectangleInfo(Float length, Float width) {
        this.length = length;
        this.width = width;
        this.area = width*length;
        this.isOrder=false;
    }

    public Float getArea(){
        return this.length*this.width;
    }
}
